clear all;
close all;

%1a
% M=2;
% Delta=0.5;
% theta=0;
% 
% a = gen_a(M,Delta,theta);

%1b
theta_start = -100;
theta_end = 100;
theta_range = linspace(theta_start,theta_end,1000);

create_plot(2, 0.5, theta_range, 1)
create_plot(3, 0.5, theta_range, 2)
create_plot(7, 0.5, theta_range, 3)
create_plot(7, 1, theta_range, 4)
create_plot(7, 2, theta_range, 5)

create_plot2(7, 0.5, theta_range, 6)

%1c
% M = 5;
% N = 10;
% Delta = 0.5;
% thetas = [0 deg2rad(60)];
% SNR = 20;
% X1 = gen_data(M,N,Delta,thetas,SNR)
% 
% thetas = [0 deg2rad(5)];
% SNR = 20;
% X2 = gen_data(M,N,Delta,thetas,SNR)
% 
% thetas = [0 deg2rad(60)];
% SNR = 0;
% X3 = gen_data(M,N,Delta,thetas,SNR)
% 
% 
% figure(1)
% semilogy(svd(X1), '*b')
% hold on
% semilogy(svd(X2), '*r')
% semilogy(svd(X3), '*g')